<?php
class MisCastImportTest extends PHPUnit_Framework_TestCase  
{  
	public $mis_obj;

	public function setUp()
	{
		$programme_data = array(
			'mis_id'   => 2009122401,
			'mis_pid'  => 2009122401,
			'pdes_id'  => 178,
			'pdes_pid' => 1,
		);
		$episode_data = array(
			'mis_id'   => 53,
			'mis_eid'  => 53,
			'mis_pid'  => 2,
			'pdes_id'  => 1,
			'pdes_eid' => 1,
			'pdes_pid' => 2,
		);
		$this->mis_obj->programme = new MisCastHelper($programme_data);
		$this->mis_obj->episode   = new MisCastHelper($episode_data);
	}
	public function tearDown()
	{
		unset($this->mis_obj);
	} 

	public function testImportProgramme()  
	{  
		$rs = $this->mis_obj->programme->import(array(801,802,803,804,805,806,818));
		if($rs!=true) var_dump($this->mis_obj->programme->getErrorMessage());
		$this->assertEquals(true, $rs);
	}

	public function testImportEpisode(){
		$rs = $this->mis_obj->episode->import(array(819,820,821));
		if($rs!=true) var_dump($this->mis_obj->episode->getErrorMessage());
		$this->assertEquals(true, $rs);
	}

	public function testImportFailure(){
		$this->assertEquals(true, true);
	}
}
